package com.china.juju.entity;


import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name="juju_raffle"
    ,catalog="zutuan_prot"
)
public class JujuRaffle  implements java.io.Serializable {

    private static final long serialVersionUID = 1L;

    public static final String ENTITY_NAME = "com.china.juju.entity.JujuRaffle";
	public static final String TABLE_NAME="juju_raffle";

    public static final String PK_Field = "id"; 
    public static final String PK_Method = "getId";  
	
	public static final String P_id = "id"; 
	public static final String P_name = "name"; 
	public static final String P_starttime = "starttime"; 
	public static final String P_endtime = "endtime"; 
	public static final String P_prizes = "prizes"; 
	public static final String P_createdAt = "createdAt"; 
	public static final String P_updatedAt = "updatedAt"; 

     private String id;
     private String name;
     private Date starttime;
     private Date endtime;
     private String prizes;
     private Date createdAt;
     private Date updatedAt;

    public JujuRaffle() {
    }
	
    public JujuRaffle(String id) {
        this.id = id;
    }
    public JujuRaffle(String id, String name, Date starttime, Date endtime, String prizes, Date createdAt, Date updatedAt) {
        this.id = id;
        this.name = name;
        this.starttime = starttime;
        this.endtime = endtime;
        this.prizes = prizes;
        this.createdAt = createdAt;
        this.updatedAt = updatedAt;
    }
   
    @Id 
    @GeneratedValue( generator="paymentableGenerator")  
    @GenericGenerator(name="paymentableGenerator", strategy="uuid")  
    
    @Column(name="ID", unique=true, nullable=false, length=36)
    public String getId() {
        return this.id;
    }
    
    public void setId(String id) {
        this.id = id;
    }
    
    @Column(name="name", length=1024)
    public String getName() {
        return this.name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="starttime", length=19)
    public Date getStarttime() {
        return this.starttime;
    }
    
    public void setStarttime(Date starttime) {
        this.starttime = starttime;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="endtime", length=19)
    public Date getEndtime() {
        return this.endtime;
    }
    
    public void setEndtime(Date endtime) {
        this.endtime = endtime;
    }
    
    @Column(name="prizes", length=65535)
    public String getPrizes() {
        return this.prizes;
    }
    
    public void setPrizes(String prizes) {
        this.prizes = prizes;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="created_at", length=19)
    public Date getCreatedAt() {
        return this.createdAt;
    }
    
    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="updated_at", length=19)
    public Date getUpdatedAt() {
        return this.updatedAt;
    }
    
    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }



    @Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}


